package com.tyx.common.exception;

public class ServiceException extends Exception {

    private Integer errorCode;
    private String errorMsg;

    public ServiceException(ErrorEnum errorCode){
        this.errorCode = errorCode.getCode();
        this.errorMsg = errorCode.getMsg();
    }

    /** errorCode */
    public Integer getErrorCode() {
        return errorCode;
    }

    /** errorCode */
    public void setErrorCode(Integer errorCode) {
        this.errorCode = errorCode;
    }

    /** errorMsg */
    public String getErrorMsg() {
        return errorMsg;
    }

    /** errorMsg */
    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }
}
